#include <ctime>

#ifndef _CLASSMODELINGANIMATION_
#define _CLASSMODELINGANIMATION_

namespace Modeling {

class Animation
{
public:
	virtual ~Animation();
	Animation(unsigned int frames=1, unsigned int FPS=1, unsigned int loops=0);

	unsigned int getFrames();
	void setFrames(unsigned int frames);

	unsigned int getFPS();
	void setFPS(unsigned int FPS);

	unsigned int getLoops();
	void setLoops(unsigned int loops);

	void play();
	void pause();
	void stop();

	bool isPlaying();
	bool isPaused();
	bool isStoped();

	unsigned int getCurrentFrame();
	void setCurrentFrame(unsigned int frame);

private:
	enum { PLAYING,	PAUSED,	STOPED };
	unsigned int frames;
	unsigned int FPS;
	unsigned int loops;
	int status;
	unsigned int currentFrame;

	clock_t T0;
	clock_t elapsedClocks;
	clock_t CPF; // Clocks Per Frame
	unsigned int elapsedFrames;
	
};

}// namespace Modeling

#endif
